<?php

namespace Database\Factories;

use Illuminate\Database\Eloquent\Factories\Factory;

class PriceFactory extends Factory
{
    /**
     * Define the model's default state.
     *
     * @return array
     */
    public function definition()
    {
        $days = $this->faker->numberBetween(-5, 10);
        return [
            'product_id' => $this->faker->numberBetween(1, 10),
            'price' => $this->faker->numberBetween(10, 1000),
            'published_at' => date('Y-m-d H:i:s', strtotime("{$days} days")),
            'created_at' => date('Y-m-d H:i:s'),
            'updated_at' => date('Y-m-d H:i:s'),
        ];
    }
}
